clear all; clc;


saveBool = false;

subjectList = {...
    'A080512A'...
    'K091412S'...
    'M101012R'...
    'N072912R'...
    'R091412V'...
    };

FFA_t_thresh = 5;
ADAPT_t_thresh = 2.5;


%analysesDir = '/Volumes/cluster/jet/mattar/AdaptID/Analyses/';
analysesDir = '/Users/marcelomattar/Desktop/Analysis_bkp/_SingleAdaptCovariate/';
index_of_1_back_adaptation_in_feat = 3;
index_of_FFAroi_in_FOBSdata = 1;


for subjIndx = 1:length(subjectList);
    
    [allResults, averageBetas] = extractROImask(subjectList{subjIndx}, saveBool, FFA_t_thresh, ADAPT_t_thresh, analysesDir, index_of_1_back_adaptation_in_feat, index_of_FFAroi_in_FOBSdata);
    
    display(averageBetas);
    
    %{
    figure(1);
    subplot(length(subjectList),1,subjIndx);
    bar(allResults{3,4});
    title(allResults{1,1});
    ylabel('Average Beta value');
    hold on;
    
    figure(2);
    subplot(length(subjectList),1,subjIndx);
    bar(allResults{2,4});
    title(allResults{1,1});
    ylabel('Average Beta value');
    hold on;
    
    figure(3);
    subplot(length(subjectList),1,subjIndx);
    bar(allResults{4,4});
    title(allResults{1,1});
    ylabel('Average Beta value');
    hold on;
    %}
    
end

%xlabel('Scan number');